<template>
  <div class="login-page">
    <q-card class="login-form-context">
      <div class="title">后台管理系统</div>
      <q-form class="q-gutter-md">
        <q-input
          filled
          label="用户名"
          lazy-rules
          :rules="[val => (val && val.length > 0) || '请输入用户名']"
        />

        <q-input
          filled
          type="password"
          label="密码"
          lazy-rules
          :rules="[val => (val && val.length > 0) || '请输入密码']"
        />

        <q-toggle v-model="accept" label="记住我" />

        <div>
          <q-btn
            label="登录"
            type="submit"
            color="primary"
            class="full-width"
          />
        </div>
      </q-form>
    </q-card>
  </div>
</template>

<script>
import { ref } from '@vue/reactivity';
export default {
  name: 'Login',
  setup() {
    const accept = ref(false);
    return {
      accept
    };
  }
};
</script>
<style scoped lang="less">
.login-page {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  .login-form-context {
    width: 400px;
    padding: 30px;
  }
  .title {
    font-size: 30px;
    text-align: center;
    margin-bottom: 30px;
  }
}
</style>
